﻿using System;
using System.Data;
using System.Collections.Generic;
namespace SqlImEx.Sql
{
    public interface ISqlContext
    {
        void DeleteAllFrom(TableDefinition tbl);
        void ExecuteSql(string query);
        DataTable ExecuteSqlQuery(string query);
        List<TableSchema> FetchTables();
        void GetAllRows(TableDefinition t, Action<IDataReader> row);
        void GetFieldData(TableDefinition t);
        List<IdentityColumn> GetIdentityColumns();
        List<TableDefinition> GetTableData();
        TableDefinition GetTableData(string schema, string table);
        bool KeepAlive { get; set; }
        //void SetConstraints(bool enable, string schema, string table);
        void SetConstraints(bool enable);
        void SetIdentity(string schema, string table, bool on);
    }
}
